function dlTabsTabTooltip()
{
	// Randomized so that different tabs would have different downloads
	this.random = Math.random();
	this.tooltipID = "dlTabs_tabTooltip_" + dlTabsTab.id + "_" + this.random;
	
	// Get the hbox in the tab label
	this.getTabHBox = function()
	{
		var list = dlTabsTab.tab.ownerDocument.getAnonymousNodes(dlTabsTab.tab);
		for(var i = 0; i < list.length; i++)
		{
			if(list[i].getAttribute("dlTabs_hbox", true))
				return(list[i]);
		}
		
		/* If the companion addon is Tree Style Tabs, look for
			"tab-image-middle"
		*/
		 
		var tabImageMiddle = getXBLElementsByClassName(dlTabsTab.tab.ownerDocument, dlTabsTab.tab,
													"tab-image-middle", new Array());
		if(tabImageMiddle.length > 0)
			return(tabImageMiddle[0]);
			
		// If all else fails, return the tab itself
		
		return(dlTabsTab.tab);
	};

	// Get the tooltip in the tab
	this.getTabTooltip = function()
	{
		var matches = getXBLElementsByClassName(dlTabsTab.tab.ownerDocument, dlTabsTab.tab,
													"dlTabs_tabTooltipCSS", new Array());
		if(matches.length > 0)
			return(matches[0]);
	};

	// Refresh the tab's tooltip
	this.refresh = function()
	{	
		// Set the tooltip id
		var hbox = this.getTabHBox();
		if(hbox)
		{
			// Randomness because there may be multiple tabs with the same download id (cancelled and failed downloads)
			hbox.setAttribute("tooltip", this.tooltipID);
		}
		
		// Get the tooltip
		this.tooltip = this.getTabTooltip();
		if(this.tooltip)
		{
			// Reassign the id if it hasn't been
			if(this.tooltip.getAttribute("id") != this.tooltipID)
				this.tooltip.setAttribute("id", this.tooltipID);
			
			// Set some constants
			this.tooltipFilename = this.tooltip.getElementsByClassName("dlTabs_filename")[0];
			this.tooltipFilename.setAttribute("value", dlTabsTab.name);
			
			this.tooltipURL = this.tooltip.getElementsByClassName("dlTabs_url")[0];
			this.tooltipURL.setAttribute("value", dlTabsTab.URL);
			
			this.tooltipFolder = this.tooltip.getElementsByClassName("dlTabs_folder")[0];
			this.tooltipFolder.setAttribute("value", dlTabsTab.folder);
			
			this.tooltipETA = this.tooltip.getElementsByClassName("dlTabs_time")[0];
			this.tooltipETA.setAttribute("value", dlTabsTab.ETA);
			
			this.tooltipPercent = this.tooltip.getElementsByClassName("dlTabs_percent")[0];
			this.tooltipPercent.setAttribute("value", dlTabsTab.rounded + "%");
			
			this.tooltipETC = this.tooltip.getElementsByClassName("dlTabs_etc")[0];
			this.tooltipETC.setAttribute("value", "(" + dlTabsTab.size + " at " + dlTabsTab.speed + ")");
		}
	};
}